package com.google.code.whitetask.old;

/**
 * <p>
 * This is an abstract class to provide interface implementations on
 * <code>FluentTask</code>. This class can free you from implementing the
 * interfaces of <code>FluentTask</code>. In general case, you will extend this
 * class to define your <code>Task</code>.
 * </p>
 * 
 * @author minslovey
 */
public abstract class AbstractFluentTask implements Task, FluentTask {
  public AsyncerDecorator asynchronously() {
    return new AsyncerDecorator(this);
  }

  public RetryDecorator retry() {
    return new RetryDecorator(this);
  }

  public RetryDecorator retry(Times times) {
    return new RetryDecorator(this).times(times);
  }

   public TryCatchDecorator caught() {
    return new TryCatchDecorator(this);
  }

  public IfRunDecorator ifResultIs(TaskResultType taskResultType) {
    return new IfRunDecorator(this).ifResultIs(taskResultType);
  }
}
